@extends(Request::ajax() ? 'layouts.partial' : 'layouts.app')
@section('content')

  {{ Form::open(array('url' => '/checkout', 'method'=>'post')) }}

  <div class="form-group">
    {{ Form::label('item_number', 'Item #') }}
    {{ Form::text('item_number', Input::old('item_id'), array ('class'=>'form-control', 'type'=>'number')) }}
  </div>

  <div class="form-group">
    {{ Form::label('checked_out_at', 'Checkout Date') }}
    {{ Form::text('checked_out_at', Input::old('checked_out_at') ? Input::old('checked_out_at') : date('m/d/y'), array ('class'=>'form-control')) }}
  </div>

   <div class="form-group">
      <input type="radio" name="status" value="out" id="status_out" {{(Input::old('status') == 'out' || !Input::old('status')) ? "checked='checked'" : ''}}"><label for="status_out">Out</label>
<br />
      <input type="radio" name="status" value="in use" id="status_in_use" {{Input::old('status') === 'in use' ? "checked='checked'" : ''}}><label for="status_in_use">In Use</label>
    </div>

<br />
  {{ Form::submit('checkout', array('class' => 'button')) }}
&nbsp; <a href='/app' class='button alert'>cancel</a>
{{ Form::close() }}
@stop